﻿namespace SuperModel
{
    using System;
    using System.ComponentModel;
    using System.Linq.Expressions;

    /// <summary>
    /// Interface for a Super-Model
    /// </summary>
    /// <typeparam name="T">
    /// The target type
    /// </typeparam>
    public interface ISuperModel : INotifyPropertyChanged
    {
        /// <summary>
        /// Subscribe to a Property Change
        /// </summary>
        /// <param name="expression">
        /// The expression.
        /// </param>
        /// <param name="handler">
        /// The handler.
        /// </param>
        void Subscribe(Expression<Func<object>> expression, Action handler);

        /// <summary>
        /// Subscribe to a Property Change By Name
        /// </summary>
        /// <param name="propertyName">
        /// The property name.
        /// </param>
        /// <param name="handler">
        /// The handler.
        /// </param>
        void Subscribe(string propertyName, Action handler);
    }
}
